/*
 *  $Id: HighFlight.cs 1067 2010-05-21 11:00:43Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008-2009 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Air.Spells {
    public class HighFlight: SelfEnchantmentCard {
        public HighFlight(): base("001_a_s_high_flight") {
            Level = CompleteLevel.ReadyForTest;
            Version = 0;
            Element = ElementType.Air;
            Value = 100;
            AddManaCost(ElementType.Air, 2);
        }

        protected override EnchantmentAffect CreateEnchantment() {
            return new HighFlightAffect();
        }

        private class HighFlightAffect: EnchantmentAffect<HighFlight> {
            public HighFlightAffect() {
                Add(new HighFlightAura());
            }
        }

        private class HighFlightAura: Affects.FlightAura {
            public HighFlightAura(): base(true, true) {}

            public override string Id {
                get { return AffectManager.GetCardId<HighFlight>("aura"); }
            }

            protected override Affect CreateSubAffect() {
                return new HighFlightAuraAffect();
            }
        }

        private class HighFlightAuraAffect: SpellAffect<HighFlight> {
            public HighFlightAuraAffect() {
                Add(new Affects.ModDamage(1));
                Add(new Affects.ModMaxHealth(-1));
                Add(new Affects.FirstStrike());
            }
        }
    }
}
